import {Component} from "@angular/core";
import {Group} from "./entity/Group";
import {GroupService} from "./service/groupService";
/**
 * Created by Administrator on 2016/8/5.
 */

@Component({
    selector:"my-body",
    templateUrl:"./app/body.html",
    providers:[GroupService]
})
export class BodyComponent{
    private groupList:Group[];

    constructor(groupService:GroupService){
        groupService.getAllGroup().subscribe(result=>this.groupList = result.json());
    }

}